package com.google.android.play.core.assetpacks;

import android.content.Context;
import android.os.Binder;
import android.os.Bundle;
import c.b.a.c.a.c.a;
import c.b.a.c.a.c.o;
import c.b.a.c.a.c.r0;
import c.b.a.c.a.c.u0;
import java.util.Arrays;

final class z extends r0 {

    /* renamed from: a  reason: collision with root package name */
    private final a f2676a = new a("AssetPackExtractionService");

    /* renamed from: b  reason: collision with root package name */
    private final Context f2677b;

    /* renamed from: c  reason: collision with root package name */
    private final AssetPackExtractionService f2678c;

    /* renamed from: d  reason: collision with root package name */
    private final b0 f2679d;

    z(Context context, AssetPackExtractionService assetPackExtractionService, b0 b0Var) {
        this.f2677b = context;
        this.f2678c = assetPackExtractionService;
        this.f2679d = b0Var;
    }

    public final void K(u0 u0Var) {
        this.f2679d.x();
        u0Var.d(new Bundle());
    }

    public final void a0(Bundle bundle, u0 u0Var) {
        String[] packagesForUid;
        this.f2676a.c("updateServiceState AIDL call", new Object[0]);
        if (o.a(this.f2677b) && (packagesForUid = this.f2677b.getPackageManager().getPackagesForUid(Binder.getCallingUid())) != null && Arrays.asList(packagesForUid).contains("com.android.vending")) {
            u0Var.i(this.f2678c.a(bundle), new Bundle());
            return;
        }
        u0Var.b(new Bundle());
        this.f2678c.b();
    }
}
